<template>
	<view class="card" v-show="type == 'detail'">
		<h2 class="title">{{ rowDetail.templateName }}</h2>
		<!-- {{rowDetail.templateType}}--{{rowDetail}} -->
		<template v-if="type == 'warning'">
			<!-- 工单 -->
			<template v-if="rowDetail.templateType == 1">
				<view>
					<view>{{ rowDetail.planContent }}</view>
				</view>
			</template>
			<!-- 设备维修 -->
			<template v-else-if="rowDetail.templateType == 2">
				<view class="card-content">
					<h4>{{ rowDetail.planContent }}</h4>
					<view>设备编号：{{rowDetail.deviceNo}}</view>
					<view>设备名称：{{rowDetail.deviceName}}</view>
					<view>提报人：{{rowDetail.reportMan}}</view>
					<view>提报时间：{{rowDetail.reportTime}}</view>
					<!-- <view>提报时间：{{rowDetail.deviceNo}}</view> -->
				</view>
			</template>
			<!-- 设备保养 设备点检-->
			<template v-else-if="[3,4].indexOf(rowDetail.templateType)!==-1">
				<view class="card-content">
					<h4>{{ rowDetail.planContent }}</h4>
					<view>设备编号：{{rowDetail.deviceNo}}</view>
					<view>设备名称：{{rowDetail.deviceName}}</view>
					<view>计划创建时间：{{rowDetail.planCreateTime}}</view>
					<view>计划开始时间：{{rowDetail.planStartTime}}</view>
				</view>
			</template>
			<!-- 模具维修 -->
			<template v-else-if="rowDetail.templateType == 5">
				<view class="card-content">
					<h4>{{ rowDetail.planContent }}</h4>
					<view>模具编号：{{rowDetail.moldCode}}</view>
					<view>模具名称：{{rowDetail.moldName}}</view>
					<view>提报人：{{rowDetail.reportMan}}</view>
					<view>提报时间：{{rowDetail.reportTime}}</view>
				</view>
			</template>
			<!-- 模具保养 模具点检 -->
			<template v-else-if="[6,7].indexOf(rowDetail.templateType)!==-1">
				<view class="card-content">
					<h4>{{ rowDetail.planContent }}</h4>
					<view>模具编号：{{rowDetail.moldCode}}</view>
					<view v-if="rowDetail.templateType==6">生产模次：{{rowDetail.productionMode}}</view>
					<view v-if="rowDetail.templateType==7">模具名称：{{rowDetail.moldName}}</view>
					<view>计划创建时间：{{rowDetail.planCreateTime}}</view>
					<view>计划开始时间：{{rowDetail.planStartTime}}</view>
				</view>
			</template>
		</template>
		<template v-if="type == 'notice'">
			<view>
				<view>{{ rowDetail.planContent }}</view>
			</view>
		</template>
	</view>
</template>

<script>
	export default {
		props: {
			rowDetail: {
				type: Object,
				default:{},
			},
			type: {
				type: String,
			},
		},
		data() {
			return {};
		},
		methods: {
		},
	};
</script>
<style scoped lang="scss">
	.card-content {
		:nth-child(1) {
			margin-bottom: 10px;
		}
	}
	.card{
		width:100%;
		border: 1px solid #ecf0f2;
		border-radius: 2rem;
		background-color: #fff;
		padding: 3rem;
		line-height: 4rem;
	}
</style>